package com.kyrie.dto;

import com.kyrie.annotation.EnumValidator;
import com.kyrie.vo.DataSourceEnum;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/***
 * 描述: 动态执行sql接口dto类
 *
 * @author wuxiang
 * @date 2020-04-17 16:00
 */
@Data
public class SqlExecuteDto implements Serializable {
    private static final long serialVersionUID = 2889914619629533018L;

    @NotBlank(message = "SQL不能为空")
    private String sql;

    @NotBlank(message = "数据库不能为空")
    @EnumValidator(value = DataSourceEnum.class,message = "当前选择的数据库类型[db]非法")
    private String db;

    @NotBlank(message = "执行类型不能为空")
    private String asyn;
}
